//
//  BaseViewController.m
//  GomeHome
//
//  Created by UNOHACHA on 16/11/30.
//  Copyright © 2016年 iMacOne. All rights reserved.
//

#import "BaseViewController.h"
#import <QuartzCore/QuartzCore.h>

//#import "UIImage+UIimage_MDKimg.h"



@interface BaseViewController ()<UITextFieldDelegate>

@property (nonatomic,strong) NSArray *datasArray;
//@property (nonatomic,strong) UITableView *tableView;



@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // Do any additional setup after loading the view.
    
    //    self.navigationController.navigationBarHidden = YES;
    //    self.automaticallyAdjustsScrollViewInsets = NO;
    
    
//    self.fd_prefersNavigationBarHidden = NO;
    
    
    self.view.backgroundColor = k_TableBackColor;
    //
    
    
    UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    //    [leftBtn addTarget:self action:@selector(rightEvents:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:rightBtn];
    
    self.view.backgroundColor = k_TableBackColor;
    self.automaticallyAdjustsScrollViewInsets = NO;
    
    self.Nav = [[UIView alloc] initWithFrame:CGRectMake(0, 0, WindowWidth, 64)];
    _Nav.backgroundColor = kWhiteColor;
    [self.view addSubview:_Nav];

    
    self.TitleNav = [[UILabel alloc] initWithFrame:CGRectMake((WindowWidth-200)/2, 20, 200, 44)];
    self.TitleNav.font = [UIFont fontWithName:@"Helvetica-Bold" size:17];
    self.TitleNav.textColor = UIColorFromRGB(0x333333);
    self.TitleNav.backgroundColor = [UIColor clearColor];
    self.TitleNav.textAlignment = NSTextAlignmentCenter;
    [_Nav addSubview:self.TitleNav];

    
    
    _leftbutton = [UIButton buttonWithType:UIButtonTypeCustom];
    _leftbutton.frame = CGRectMake(-10, 25, 50, 30);
    [_leftbutton setImage:IMAGE(@"black-return") forState:UIControlStateNormal];
    
    [_leftbutton addTarget:self action:@selector(leftEvents) forControlEvents:UIControlEventTouchUpInside];
    [_Nav addSubview:_leftbutton];

    _rigltbutton = [UIButton buttonWithType:UIButtonTypeCustom];
    _rigltbutton.frame = CGRectMake(WindowWidth-50, 20, 60, 44);
    [_rigltbutton setTitleColor:UIColorFromRGB(0x666666) forState:UIControlStateNormal];
    [_rigltbutton addTarget:self action:@selector(rightEvents) forControlEvents:UIControlEventTouchUpInside];
    _rigltbutton.titleLabel.font=FONT(14);
//    _rigltbutton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
//    _rigltbutton.titleEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 10);
    [_Nav addSubview:_rigltbutton];
    
    
//    self.view.backgroundColor = [UIColor whiteColor];
    

}
-(UIView *)shadow{
    
    UIView * _shadowView=[[UIView alloc]initWithFrame:CGRectMake(0, kMaxY(self.Nav.frame)-2, kScreenWidth, 1)];
    _shadowView.backgroundColor=kWhiteColor;
    CGMutablePathRef path = CGPathCreateMutable();
    CGPathAddRect(path, NULL, _shadowView.bounds);
    _shadowView.backgroundColor=kWhiteColor;
    _shadowView.layer.shadowPath = path;
    CGPathCloseSubpath(path);
    CGPathRelease(path);
    _shadowView.layer.shadowColor = HOME_COLOR.CGColor;
    _shadowView.layer.shadowOffset = CGSizeMake(0, 2);
    _shadowView.layer.shadowRadius = 4;
    _shadowView.layer.shadowOpacity = 0.7;
    _shadowView.clipsToBounds = NO;

    return _shadowView;
}



- (void)viewDidDisappear:(BOOL)animated {
    [super viewDidDisappear:YES];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)leftEvents
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)rightEvents{
    
}

#pragma mark - 下拉刷新
-(void)loadNewData{
//    self.timer  =[NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(timeAction) userInfo:nil repeats:YES];
//    self.time = 3;
}


@end
